<%@ page import="com.liliya.service.impl.SubCateServiceImpl" %>
<%@ page import="com.liliya.pojo.SubCate" %>
<%@ page import="com.liliya.service.impl.CateServiceImpl" %>
<%@ page import="com.liliya.pojo.Cate" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/4
  Time: 14:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商城子类删除</title>
    <style>

        .blue_text {
            width: 100px;
            /*background: rgb(112, 144, 183);*/
        }

        table, tr, td {
            border: 1px solid rgb(112, 144, 183);
            text-align: center;
        }
        td{
            padding: 9px;
        }
        table {
            margin: auto;
            margin-bottom: 70px;
            width: 650px;
        }
        .main {
            border: 2px solid cornflowerblue;
        }

    </style>
</head>
<script src="${pageContext.request.contextPath}/js/jquery-3.5.1.min.js">

</script>
<body>

<div style="width: 760px">
    <%@ include file="../common/header.jsp" %>
    <div class="main">
        <div style="margin: 10px 20px">
            <img src="../img/category.gif" alt="商城子类管理">
        </div>
        <div style="text-align: center;font-size: 22px;color:rgb(112, 144, 183);margin-bottom: 20px">
            你确定要删除此子类吗?

        </div>
        <table cellspacing="0" cellpadding="12">

            <tr>
                <td class="blue_text">子类名称</td>
                <td colspan="3">${subCate.subcatename}</td>
            </tr>
            <tr>
                <td class="blue_text">所属大类</td>
                <td colspan="3">
                    ${cate.catename}
                </td>
            </tr>

            <tr>
                <td class="blue_text">描 述</td>
                <td colspan="3">${subCate.subcatedes}</td>

            </tr>
            <tr>
                <td class="blue_text">图 片</td>
                <td colspan="3"><img src="${pageContext.request.contextPath}${subCate.subcatimglink}" alt=""></td>
            </tr>
            <tr>
                <td class="blue_text">样 式</td>
                <td colspan="3">${subCate.subcatestyle}</td>
            </tr>

            <tr>
                <td colspan="3"><button id="delsubcate">确认</button> <button>取消</button> </td>
            </tr>
        </table>
    </div>

    <%@ include file="../common/footer.jsp" %>
</div>
</body>
<script>
    $(function () {
        $("#delsubcate").click(function () {
            $.post({
                async:false,
                url:"${pageContext.request.contextPath}/subcate/del",
                data:{
                    "subcatnum":${subCate.subcatenum}
                },
                success:function () {
                    window.location.href = "${pageContext.request.contextPath}/subcate/main"
                }
            })
        })
    })
</script>
</html>
